package com.blb.kafka_consumer.listener;

import com.blb.kafka_consumer.config.KafkaConfig;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class MyKafkaListener {

    @KafkaListener(topics = KafkaConfig.TOPIC)
    public void receiveMessage(ConsumerRecord<?,?> message){
        System.out.println("received:" + message.value());
    }
}
